Skip to content

[JS] fix: #247 #635 Add fallthrough for empty result Task Module Fetch and tests#772

Merged
corinagum merged 4 commits intomainfrom
cg/events-fixes
Nov 6, 2023
Merged

[JS] fix: #247 #635 Add fallthrough for empty result Task Module Fetch and tests#772
corinagum merged 4 commits intomainfrom
cg/events-fixes

Conversation

@corinagum
Copy link
Copy Markdown
Collaborator

Linked issues

closes: #635
closes: #247

Details

  • A behavior that was missing from Task Modules was handling submit "continue" scenario when the handler does not return a TaskModuleResponse or string. This ensures that the expected response (empty 200) is sent even if there is nothing new to render/send.
  • Modify so that Teams events check for channelId using Channels enum, not 'msteams' string
    • This included minor refactor for Message Extension and Application as well
  • Add Task Module tests to get the file to 80% coverage

Attestation Checklist

  • My code follows the style guidelines of this project

  • I have checked for/fixed spelling, linting, and other errors

  • I have commented my code for clarity

  • I have made corresponding changes to the documentation (we use TypeDoc to document our code)

  • My changes generate no new warnings

  • I have added tests that validates my changes, and provides sufficient test coverage. I have tested with:

    • Local testing
    • E2E testing in Teams
  • New and existing unit tests pass locally with my changes

Additional information

Thank you @th1nkful for the original PR, which I modified to match Bot Framework protocol :)

Comment thread js/packages/teams-ai/src/TaskModules.spec.ts Outdated
@corinagum corinagum merged commit a235c1c into main Nov 6, 2023
@corinagum corinagum deleted the cg/events-fixes branch November 6, 2023 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request]: Add support for ignore TaskModule submit invocations Activity handlers: task events

3 participants